<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="ClienteCreateDlg" widgetVar="ClienteCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateClienteTitle}">
            <h:form id="ClienteCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{clienteController.selected != null}">
                        <p:outputLabel value="#{bundle.CreateClienteLabel_idCliente}" for="idCliente" />
                        <p:inputText id="idCliente" value="#{clienteController.selected.idCliente}" title="#{bundle.CreateClienteTitle_idCliente}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_idCliente}"/>
                        <p:outputLabel value="#{bundle.CreateClienteLabel_nit}" for="nit" />
                        <p:inputText id="nit" value="#{clienteController.selected.nit}" title="#{bundle.CreateClienteTitle_nit}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_nit}"/>
                        <p:outputLabel value="#{bundle.CreateClienteLabel_nombre}" for="nombre" />
                        <p:inputText id="nombre" value="#{clienteController.selected.nombre}" title="#{bundle.CreateClienteTitle_nombre}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_nombre}"/>
                        <p:outputLabel value="#{bundle.CreateClienteLabel_apellido}" for="apellido" />
                        <p:inputText id="apellido" value="#{clienteController.selected.apellido}" title="#{bundle.CreateClienteTitle_apellido}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_apellido}"/>
                        <p:outputLabel value="#{bundle.CreateClienteLabel_genero}" for="genero" />
                        <p:inputText id="genero" value="#{clienteController.selected.genero}" title="#{bundle.CreateClienteTitle_genero}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_genero}"/>
                        <p:outputLabel value="#{bundle.CreateClienteLabel_direccion}" for="direccion" />
                        <p:inputText id="direccion" value="#{clienteController.selected.direccion}" title="#{bundle.CreateClienteTitle_direccion}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_direccion}"/>
                        <p:outputLabel value="#{bundle.CreateClienteLabel_ciudad}" for="ciudad" />
                        <p:inputText id="ciudad" value="#{clienteController.selected.ciudad}" title="#{bundle.CreateClienteTitle_ciudad}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_ciudad}"/>
                        <p:outputLabel value="#{bundle.CreateClienteLabel_pais}" for="pais" />
                        <p:inputText id="pais" value="#{clienteController.selected.pais}" title="#{bundle.CreateClienteTitle_pais}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_pais}"/>
                        <p:outputLabel value="#{bundle.CreateClienteLabel_telefono}" for="telefono" />
                        <p:inputText id="telefono" value="#{clienteController.selected.telefono}" title="#{bundle.CreateClienteTitle_telefono}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_telefono}"/>
                        <p:outputLabel value="#{bundle.CreateClienteLabel_email}" for="email" />
                        <p:inputText id="email" value="#{clienteController.selected.email}" title="#{bundle.CreateClienteTitle_email}" required="true" requiredMessage="#{bundle.CreateClienteRequiredMessage_email}"/>
                        <p:outputLabel value="#{bundle.CreateClienteLabel_fecCreaUsu}" for="fecCreaUsu" />
                        <p:calendar id="fecCreaUsu" pattern="MM/dd/yyyy HH:mm:ss" value="#{clienteController.selected.fecCreaUsu}" title="#{bundle.EditClienteTitle_fecCreaUsu}"  showOn="button"/>
                        <p:outputLabel value="#{bundle.CreateClienteLabel_creadoPorIdUsuario}" for="creadoPorIdUsuario" />
                        <p:inputText id="creadoPorIdUsuario" value="#{clienteController.selected.creadoPorIdUsuario}" title="#{bundle.CreateClienteTitle_creadoPorIdUsuario}" />
                        <p:outputLabel value="#{bundle.CreateClienteLabel_indHabilitadocli}" for="indHabilitadocli" />
                        <p:selectBooleanCheckbox id="indHabilitadocli" value="#{clienteController.selected.indHabilitadocli}" required="true" requiredMessage="#{bundle.EditClienteRequiredMessage_indHabilitadocli}"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{clienteController.create}" value="#{bundle.Save}" update="display,:ClienteListForm:datalist,:growl" oncomplete="handleSubmit(args,'ClienteCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="ClienteCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
